-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add way to get coin states in batches #17300
Conversation
880e825
to
16bbe9e
Compare
Pull Request Test Coverage Report for Build 7626699349Warning: This coverage report may be inaccurate.We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it would make sense to generate the coins in height order instead, and compare them directly to what you get back from the coin store, without sorting the coin states by amount
.
The main challenge would be the cut in the middle where you need to make another request batch
Would also be useful to look into why the tests don't exercise line 495 as the coverage diff reports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the fixture is an important change to make.
I'm also not convinced you test the include_hints
case. The SQL query is quite complex, I'm not confident that I can tell that it's correct (until we have a solid test)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! Feel free to resolve my comments. Maybe we should let Earle have another pass before we land as well
Purpose:
When added to the wallet protocol, this will allow wallets to sync their coin state efficiently in batches rather than downloading all of the state in a single response (which can fail if it's too large).
Testing Notes:
There is a unit test for ensuring that it successfully fetches the correct number of coins with a high volume of puzzle hashes (including with filters enabled and disabled), and another for high coin record count.